package cn.net.lwj.common.util;

public class CommonProperties {

    //@Value("${cldir:''}")
    //材料路径
    public static String CLDIR;
    //备份文件路径
    public static String BAKDIR;
    //异常备份地址
    public static String ERRORBAKDIR;
    //日志文件路径
    public static String UPLOADLOG;
    //材料上传线程数
    public static Integer THREADCOUNT = 10;

    //数据库在此配置
    //public static String JDBC_URL = "jdbc:mysql://192.1.173.93:3306/dagl?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull";
    //public static String JDBC_USER = "root";
    //public static String JDBC_PWD = "withub@xf2020";
    public static String JDBC_URL = "jdbc:mysql://149.0.0.83:3306/dagl?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull";
    public static String JDBC_USER = "root";
    public static String JDBC_PWD = "123456789qwe,./";
    //ftp在此配置
    //public static String FTP_IP = "192.1.32.190";
    public static String FTP_IP = "127.0.0.1";
    public static Integer FTP_PORT = 21;
    public static String FTP_USER = "ftpuser";
    public static String FTP_PWD = "ftpuser";


    /**
     * 华宇交互 包名验证
     */
    public static String BASENAME_REG = "^(?<time>\\d{8,16})_(?<gfdm>\\d{1,5})_(?<xfbs>[a-zA-Z\\d-]+)_(?<sjjd>\\d{4})_(?<tblx>[a-z]+)";
    public static String FB_SUFFIX_REG = "[_-](?<p>\\d{1,3})[_-](?<cur>\\d{1,3})";
    //分包全匹配:20210615_000336df8cb-5c8f-443f-96be-e9431e213f1e_1001_import_2_1
    public static String FILENAME_FBREG_ALL = BASENAME_REG + FB_SUFFIX_REG + "$";
    public static String ZIPNAME_FBREG_ALL = BASENAME_REG + FB_SUFFIX_REG + ".zip$";
    //未分包全匹配 :20210615_000336df8cb-5c8f-443f-96be-e9431e213f1e_1001_import
    public static String FILENAME_WFBREG_ALL = BASENAME_REG + "$";
    public static String ZIPNAME_WFBREG_ALL = BASENAME_REG + ".zip$";
    //通用验证  兼容分包与未分包  无结尾$验证
    public static String FILENAME_TYREG = BASENAME_REG + "(" + FB_SUFFIX_REG + ")?";
    //public static String FILENAME_TYZIPREG = FILENAME_TYREG + ".zip";
    public static String FILENAME_TYZIPREG = FILENAME_TYREG + ".z(ip|\\d{1,4})";//.z01
    public static String FILENAME_GZYC_ZIPREG = FILENAME_TYREG + ".z(ip|\\d{1,4}).[a-z]{4,15}";//.zip.unimas

    static {
        CLDIR = ConfigUtil.getSystemInfo("cldir");
        BAKDIR = CLDIR + "_BAK";
        ERRORBAKDIR = CLDIR + "_ERROR";
        UPLOADLOG = ERRORBAKDIR + "/log/";
    }


}
